home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 November
/
PCWorld_2006-11_cd.bin
/
domacnost a kancelar
/
opencontacts
/
ocusetup.exe
/
setup.exe
/
{code_GetDataFolder}
/
Templates
/
SyncMLSIF.xsl
< prev
Wrap
Extensible Markup Language
|
2006-10-03
|
8KB
|
224 lines
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" />
<xsl:template match="/">
<xsl:for-each select="OpenContacts/Contacts/Contact">
<contact>
<LastName><xsl:value-of select="@Surname"/></LastName>
<FirstName><xsl:value-of select="@GivenName"/></FirstName>
<MiddleName><xsl:value-of select="@MidName"/></MiddleName>
<Title><xsl:value-of select="@Title"/></Title>
<Body><xsl:value-of select="Notes"/></Body>
<xsl:for-each select="Sections/Section">
<xsl:choose>
<xsl:when test="@Name='Personal'">
<xsl:for-each select="Fields/Field">
<xsl:choose>
<xsl:when test="@Name='Phone'">
<HomeTelephoneNumber><xsl:value-of select="@Value"/></HomeTelephoneNumber>
</xsl:when>
<xsl:when test="@Name='Phone2'">
<Home2TelephoneNumber><xsl:value-of select="@Value"/></Home2TelephoneNumber>
</xsl:when>
<xsl:when test="@Name='Fax'">
<HomeFaxNumber><xsl:value-of select="@Value"/></HomeFaxNumber>
</xsl:when>
<xsl:when test="@Name='City'">
<HomeAddressCity><xsl:value-of select="@Value"/></HomeAddressCity>
</xsl:when>
<xsl:when test="@Name='Country'">
<HomeAddressCountry><xsl:value-of select="@Value"/></HomeAddressCountry>
</xsl:when>
<xsl:when test="@Name='Postcode'">
<HomeAddressPostalCode><xsl:value-of select="@Value"/></HomeAddressPostalCode>
</xsl:when>
<xsl:when test="@Name='PO Box'">
<HomeAddressPostOfficeBox><xsl:value-of select="@Value"/></HomeAddressPostOfficeBox>
</xsl:when>
<xsl:when test="@Name='State'">
<HomeAddressState><xsl:value-of select="@Value"/></HomeAddressState>
</xsl:when>
<xsl:when test="@Name='Street'">
<HomeAddressStreet><xsl:value-of select="@Value"/></HomeAddressStreet>
</xsl:when>
<xsl:when test="@Name='Address'">
<HomeLabel><xsl:value-of select="@Value"/></HomeLabel>
</xsl:when>
<xsl:when test="@Name='Web'">
<WebPage><xsl:value-of select="@Value"/></WebPage>
</xsl:when>
<xsl:when test="@Name='Hobby'">
<Hobby><xsl:value-of select="@Value"/></Hobby>
</xsl:when>
<xsl:when test="@Name='Gender'">
<Gender><xsl:value-of select="@Value"/></Gender>
</xsl:when>
<xsl:when test="@Name='Children'">
<Children><xsl:value-of select="@Value"/></Children>
</xsl:when>
<xsl:when test="@Name='Email'">
<Email1Address><xsl:value-of select="@Value"/></Email1Address>
</xsl:when>
<xsl:when test="@Name='Email2'">
<Email2Address><xsl:value-of select="@Value"/></Email2Address>
</xsl:when>
<xsl:when test="@Name='Email3'">
<Email3Address><xsl:value-of select="@Value"/></Email3Address>
</xsl:when>
<xsl:when test="@Name='Mobile'">
<MobileTelephoneNumber><xsl:value-of select="@Value"/></MobileTelephoneNumber>
</xsl:when>
<xsl:when test="@Name='Nick Name'">
<NickName><xsl:value-of select="@Value"/></NickName>
</xsl:when>
<xsl:when test="@Name='Spouse'">
<Spouse><xsl:value-of select="@Value"/></Spouse>
</xsl:when>
<xsl:when test="@Name='Suffix'">
<Suffix><xsl:value-of select="@Value"/></Suffix>
</xsl:when>
<xsl:when test="@Name='Primary Phone'">
<PrimaryTelephoneNumber><xsl:value-of select="@Value"/></PrimaryTelephoneNumber>
</xsl:when>
<xsl:when test="@Name='Pager'">
<PagerNumber><xsl:value-of select="@Value"/></PagerNumber>
</xsl:when>
<xsl:when test="@Name='Birthday'">
<Birthday><xsl:value-of select="@Value"/></Birthday>
</xsl:when>
<xsl:when test="@Name='Anniversary'">
<Anniversary><xsl:value-of select="@Value"/></Anniversary>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:when test="@Name='Work'">
<xsl:for-each select="Fields/Field">
<xsl:choose>
<xsl:when test="@Name='Phone2'">
<Business2TelephoneNumber><xsl:value-of select="@Value"/></Business2TelephoneNumber>
</xsl:when>
<xsl:when test="@Name='City'">
<BusinessAddressCity><xsl:value-of select="@Value"/></BusinessAddressCity>
</xsl:when>
<xsl:when test="@Name='Country'">
<BusinessAddressCountry><xsl:value-of select="@Value"/></BusinessAddressCountry>
</xsl:when>
<xsl:when test="@Name='Postcode'">
<BusinessAddressPostalCode><xsl:value-of select="@Value"/></BusinessAddressPostalCode>
</xsl:when>
<xsl:when test="@Name='PO Box'">
<BusinessAddressPostOfficeBox><xsl:value-of select="@Value"/></BusinessAddressPostOfficeBox>
</xsl:when>
<xsl:when test="@Name='State'">
<BusinessAddressState><xsl:value-of select="@Value"/></BusinessAddressState>
</xsl:when>
<xsl:when test="@Name='Street'">
<BusinessAddressStreet><xsl:value-of select="@Value"/></BusinessAddressStreet>
</xsl:when>
<xsl:when test="@Name='Fax'">
<BusinessFaxNumber><xsl:value-of select="@Value"/></BusinessFaxNumber>
</xsl:when>
<xsl:when test="@Name='Address'">
<BusinessLabel><xsl:value-of select="@Value"/></BusinessLabel>
</xsl:when>
<xsl:when test="@Name='Phone'">
<BusinessTelephoneNumber><xsl:value-of select="@Value"/></BusinessTelephoneNumber>
</xsl:when>
<xsl:when test="@Name='Web'">
<BusinessWebPage><xsl:value-of select="@Value"/></BusinessWebPage>
</xsl:when>
<xsl:when test="@Name='Assistant'">
<AssistantName><xsl:value-of select="@Value"/></AssistantName>
</xsl:when>
<xsl:when test="@Name='Primary Phone'">
<CompanyMainTelephoneNumber><xsl:value-of select="@Value"/></CompanyMainTelephoneNumber>
</xsl:when>
<xsl:when test="@Name='Company'">
<CompanyName><xsl:value-of select="@Value"/></CompanyName>
</xsl:when>
<xsl:when test="@Name='Department'">
<Department><xsl:value-of select="@Value"/></Department>
</xsl:when>
<xsl:when test="@Name='Manager'">
<ManagerName><xsl:value-of select="@Value"/></ManagerName>
</xsl:when>
<xsl:when test="@Name='Profession'">
<Profession><xsl:value-of select="@Value"/></Profession>
</xsl:when>
<xsl:when test="@Name='Title'">
<JobTitle><xsl:value-of select="@Value"/></JobTitle>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:when test="@Name='Other'">
<xsl:for-each select="Fields/Field">
<xsl:choose>
<xsl:when test="@Name='City'">
<OtherAddressCity><xsl:value-of select="@Value"/></OtherAddressCity>
</xsl:when>
<xsl:when test="@Name='Country'">
<OtherAddressCountry><xsl:value-of select="@Value"/></OtherAddressCountry>
</xsl:when>
<xsl:when test="@Name='Postcode'">
<OtherAddressPostalCode><xsl:value-of select="@Value"/></OtherAddressPostalCode>
</xsl:when>
<xsl:when test="@Name='PO Box'">
<OtherAddressPostOfficeBox><xsl:value-of select="@Value"/></OtherAddressPostOfficeBox>
</xsl:when>
<xsl:when test="@Name='State'">
<OtherAddressState><xsl:value-of select="@Value"/></OtherAddressState>
</xsl:when>
<xsl:when test="@Name='Street'">
<OtherAddressStreet><xsl:value-of select="@Value"/></OtherAddressStreet>
</xsl:when>
<xsl:when test="@Name='Fax'">
<OtherFaxNumber><xsl:value-of select="@Value"/></OtherFaxNumber>
</xsl:when>
<xsl:when test="@Name='Address'">
<OtherLabel><xsl:value-of select="@Value"/></OtherLabel>
</xsl:when>
<xsl:when test="@Name='Phone'">
<OtherTelephoneNumber><xsl:value-of select="@Value"/></OtherTelephoneNumber>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</contact>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>